Basically a "
christianized" version of masonic ceremonies, modified by
mormonism's founder Joseph Smith, who himself was a free mason.
Brigham Young, the second mormon prophet said, "Your endowment is, to receive all those ordinances in the House of the Lord, which are necessary for you, after you have departed this life, to enable you to walk back to the presence of the Father, passing the angels who stand as sentinels, being enabled to give them the key words, the signs and tokens, pertaining to the Holy Priesthood, and gain your eternal exaltation in spite of earth and hell." (Journal of
Discourses 2:31).
In 1990 the endowment was changed to remove the masonic penalties, wherein mormons formerly vowed that if they revealed the temple secrets they could have their life taken in various ways. Also women no longer vowed to be obedient to their husbands unconditionally, but only on the condition that he listened to God i.e. he wasn't a bastard and was "righteous". Probably due to the feminist movements growing within the church.
The tokens are secret handshakes you need to get to heaven, and you have to know their names, and their signs (made holding your hands and arms in various positions).